package top.azusall.common.entity;

import lombok.Data;

/**
 * @author houmo
 */
@Data
public class R {

    private int code;
    private String msg;
    private Object data;

    public R(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static  R ok() {
        return new R(200, "", null);
    }

    public static  R ok(String msg, Object data) {
        return new R(200, msg, data);
    }



    public static R err() {
        return new R(500, "", null);
    }

    public static  R err(String msg, Object data) {
        return new R(500, msg, data);
    }
}
